package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 学生答题记录对象 exam_student_record
 *
 * @author tyro
 * @date 2025-05-21
 */
public class ExamStudentRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 试卷ID */
    @Excel(name = "试卷ID")
    private Long paperId;

    /** 学生ID */
    @Excel(name = "学生ID")
    private Long studentId;

    /** 题目ID */
    @Excel(name = "题目ID")
    private Long questionId;

    /** 学生答案 */
    @Excel(name = "学生答案")
    private String studentAnswer;

    /** 得分 */
    @Excel(name = "得分")
    private BigDecimal score;

    /** 是否正确：1-正确，0-错误，NULL-未评分 */
    @Excel(name = "是否正确：1-正确，0-错误，NULL-未评分")
    private Integer isCorrect;

    /** 评语 */
    @Excel(name = "评语")
    private String comment;

    /** 提交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date submitTime;

    /** 评分人（教师ID或"system"表示系统评分） */
    @Excel(name = "评分人", readConverterExp = "教师ID或system表示系统评分")
    private String gradedBy;

    /** 评分时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评分时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gradeTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setPaperId(Long paperId)
    {
        this.paperId = paperId;
    }

    public Long getPaperId()
    {
        return paperId;
    }
    public void setStudentId(Long studentId)
    {
        this.studentId = studentId;
    }

    public Long getStudentId()
    {
        return studentId;
    }
    public void setQuestionId(Long questionId)
    {
        this.questionId = questionId;
    }

    public Long getQuestionId()
    {
        return questionId;
    }
    public void setStudentAnswer(String studentAnswer)
    {
        this.studentAnswer = studentAnswer;
    }

    public String getStudentAnswer()
    {
        return studentAnswer;
    }
    public void setScore(BigDecimal score)
    {
        this.score = score;
    }

    public BigDecimal getScore()
    {
        return score;
    }
    public void setIsCorrect(Integer isCorrect)
    {
        this.isCorrect = isCorrect;
    }

    public Integer getIsCorrect()
    {
        return isCorrect;
    }
    public void setComment(String comment)
    {
        this.comment = comment;
    }

    public String getComment()
    {
        return comment;
    }
    public void setSubmitTime(Date submitTime)
    {
        this.submitTime = submitTime;
    }

    public Date getSubmitTime()
    {
        return submitTime;
    }
    public void setGradedBy(String gradedBy)
    {
        this.gradedBy = gradedBy;
    }

    public String getGradedBy()
    {
        return gradedBy;
    }
    public void setGradeTime(Date gradeTime)
    {
        this.gradeTime = gradeTime;
    }

    public Date getGradeTime()
    {
        return gradeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("paperId", getPaperId())
            .append("studentId", getStudentId())
            .append("questionId", getQuestionId())
            .append("studentAnswer", getStudentAnswer())
            .append("score", getScore())
            .append("isCorrect", getIsCorrect())
            .append("comment", getComment())
            .append("submitTime", getSubmitTime())
            .append("gradedBy", getGradedBy())
            .append("gradeTime", getGradeTime())
            .toString();
    }
}
